package com.goodving.guli.server;

import android.content.Context;
import android.os.Build.VERSION;

import com.goodving.guli.activity.SettingContainerActivity;
import com.goodving.guli.bt.model.LoginData;
import com.goodving.guli.bt.model.SportBaseInfo;
import com.goodving.guli.server.sync.SyncServerData;
import com.goodving.guli.view.C3657a;
import com.goodving.guli.view.C4220a;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone;

import cn.com.smartdevices.bracelet.config.C0886a;
import cn.com.smartdevices.bracelet.config.Config;

/* renamed from: cn.com.smartdevices.bracelet.j.g */
public class ClientConstant extends URL { // C1324g
    public static final String f6756A = "huami.health.loginout.json";
    public static final String f6757B = "huami.health.queryRecordRank.json";
    public static final String f6758C = "huami.health.apk.upgrade.detect.json";
    public static final String f6759D = "wxunbind.json";
    public static final String f6760E = "huami.health.getThirdAppList.json";
    public static final String f6761F = "huami.health.cancelAuthorization.json";
    public static final String f6762G = "huami.health.authorizeThirdApp.json";
    public static final String f6763H = "huami.health.fetchThirdAppData.json";
    public static final String f6764I = "huami.partner.bindThirdApp.json";
    public static final String f6765J = "huami.partner.checkBindStatus.json";
    public static final String f6766K = "huami.partner.updateAppToken.json";
    public static final String f6767L = "huami.partner.getAppToken.json";
    public static final String f6768M = "huami.health.getUserLazyDay.json";
    public static final String f6769N = "huami.health.setUserLazyDay.json";
    public static final String f6770O = "huami.health.uploadTag.json";
    public static final String f6771P = "huami.health.storeHeartRate.json";
    public static final String f6772Q = "huami.health.getHeartRate.json";
    public static final String f6773R = "huami.health.band.userFriend.remindFriend.json";
    public static final String f6774S = "huami.health.band.pushMessage.acceptInvitation.json";
    public static final String f6775T = "huami.health.band.userFriend.removeRelationship.json";
    public static final String f6776U = "huami.health.band.pushMessage.sendInvitation.json";
    public static final String f6777V = "huami.health.band.userFriend.getFriendList.json";
    public static final String f6778W = "huami.health.band.userBasicInfo.searchUser.json";
    public static final String f6779X = "huami.health.band.userFriend.getUserFriendInfo.json";
    public static final String f6780Y = "huami.health.band.userFriend.updateFriendNick.json";
    // public static final String f6781Z = "huami.health.scale.save.json";
    public static final String f6781Z = "GooPowerServer/CreatePersonPortrait.action";
    public static final String f6782a = "huami.health.receiveData.json";
    public static final String aa = "huami.health.scale.get.json";
    public static final String ab = "huami.health.scale.delete.json";
    public static final String ac = "huami.health.scale.familymember.save.json";
    public static final String ad = "huami.health.scale.familymember.get.json";
    public static final String ae = "huami.health.scale.familymember.delete.json";
    public static final String af = "huami.health.scale.device.save.json";
    public static final String ag = "huami.health.scale.device.get.json";
    public static final String ah = "huami.health.scale.usergoal.saveusergoal.json";
    public static final String ai = "huami.health.scale.usergoal.getusergoal.json";
    public static final String aj = "huami.health.scale.usergoal.getusergoallist.json";
    public static final String ak = "huami.health.scale.usergoal.getusergoallast.json";
    public static final String al = "huami.health.scale.usergoal.deleteusergoal.json";
    public static final String am = "huami.health.addLoginTag.json";
    public static final String an = "huami.health.getStartPageList.json";
    public static final String f6783b = "huami.health.bindProfile.json";
    public static final String f6784c = "huami.health.getUserInfo.json";
    public static final String f6785d = "huami.health.apklogin.json";
    public static final String f6786e = "huami.health.backup.json";
    public static final String f6787f = "huami.health.report.json";
    public static final String f6788g = "huami.health.updatedevicedata.json";
    public static final String f6789h = "huami.health.createwxqr.json";
    public static final String f6790i = "huami.health.uploadcollectdata.json";
    public static final String f6791j = "huami.health.uploadlogdata.json";
    public static final String f6792k = "huami.health.getDataNew.json";
    public static final String f6793l = "huami.health.getluapackdata.json";
    public static final String f6794v = "huami.health.getlatestluaversion.json";
    public static final String f6795w = "huami.health.getlatestluaversionlist.json";
    public static final String f6796x = "huami.health.gethuodongconfig.json";
    public static final String f6797y = "huami.health.detectuserwhetherjoinhuodong.json";
    public static final String f6798z = "huami.health.getSysTime.json";

    private static String m11560a(String str, String str2) {
        return Config.m8873e() + str + str2;
    }

    public static String m11561a(String str, HashMap<String, String> hashMap) {
        return ClientConstant.m11560a(str, ClientConstant.m11562a(ClientUtil.m11569a((Map) hashMap)));
    }

    public static String m11562a(HashMap<String, String> hashMap) {
        Iterator it = hashMap.entrySet().iterator();
        String str = "?";
        while (it.hasNext()) {
            Entry entry = (Entry) it.next();
            String str2 = ((str + ((String) entry.getKey())) + "=") + ((String) entry.getValue());
            if (it.hasNext()) {
                str2 = str2 + "&";
            }
            str = str2;
        }
        return str;
    }

    public static HashMap<String, String> m11563a(LoginData loginData) {
        HashMap<String, String> hashMap = new HashMap();
        Config h = Config.m8876h();
        hashMap.put(SyncServerData.f8320f, C3657a.f18328f + loginData.uid);
        hashMap.put(C4220a.f20892o, loginData.security);
        String str = SportBaseInfo.VERSION;
        h.getClass();
        hashMap.put(str, "1.0");
        hashMap.put("appid", C3657a.f18328f + h.f4192b.f4237a);
        hashMap.put(ClientDataConstants.PARAM_CALLID, C3657a.f18328f + System.currentTimeMillis());
        hashMap.put(ClientDataConstants.PARAM_SYS_LANGUAGE, Locale.getDefault().getLanguage());
        hashMap.put("country", Locale.getDefault().getCountry());
        hashMap.put(ClientDataConstants.f6739j, TimeZone.getDefault().getID());
        hashMap.put("channel", TimeZone.getDefault().getID());
        hashMap.put(SyncServerData.f8332r, "android_" + VERSION.SDK_INT);
        hashMap.put(SettingContainerActivity.f9257a, Config.m8872d());
        hashMap.put(ClientDataConstants.f6741l, Config.m8865b() + "_" + Config.m8858a());
        return hashMap;
    }

    public static Map<String, String> m11564a(Context context) {
        Config h = Config.m8876h();
        LoginData f = C0886a.m9071f(context);
        Map<String, String> hashMap = new HashMap();
        hashMap.put(SyncServerData.f8320f, C3657a.f18328f + f.uid);
        hashMap.put(C4220a.f20892o, f.security);
        String str = SportBaseInfo.VERSION;
        h.getClass();
        hashMap.put(str, "1.0");
        hashMap.put("appid", C3657a.f18328f + h.f4192b.f4237a);
        hashMap.put(ClientDataConstants.PARAM_CALLID, C3657a.f18328f + System.currentTimeMillis());
        hashMap.put(ClientDataConstants.PARAM_SYS_LANGUAGE, Locale.getDefault().getLanguage());
        hashMap.put(ClientDataConstants.f6739j, TimeZone.getDefault().getID());
        hashMap.put("channel", Config.m8870c());
        hashMap.put(SettingContainerActivity.f9257a, Config.m8872d());
        hashMap.put(SyncServerData.f8332r, "android_" + VERSION.SDK_INT);
        hashMap.put(ClientDataConstants.f6741l, Config.m8865b() + "_" + Config.m8858a());
        return hashMap;
    }

    public static String m11565b(String str, HashMap<String, String> hashMap) {
        return ClientConstant.m11560a(str, ClientConstant.m11562a(ClientUtil.m11572b((Map) hashMap)));
    }
}
